package com.zoweunion.mechanic.sqlprovider;
 
/**
 * @Description:  
 * @author: 王春伟 
 * @date:   2018年12月28日 下午7:07:50    
 * @Copyright: 2018 www.zoweunion.com Inc. All rights reserved.
 */
public class KanBanSqlProvider {

	//查询总故障类型
	public String getTotalCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6";
	}
	//查询动力故障类型
	public String getDongLiCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6 and T_SS_DICTIONARIES.dictionaries_name=#{dictionaries_name_dl}";
	}
	//查询液压故障类型
	public String getYeYaCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6 and T_SS_DICTIONARIES.dictionaries_name=#{dictionaries_name_ya}";
	}
	//查询电器故障类型
	public String getDianQiCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6 and T_SS_DICTIONARIES.dictionaries_name=#{dictionaries_name_dq}";
	}
	//查询工作装置类型
	public String getGongZuoCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6 and T_SS_DICTIONARIES.dictionaries_name=#{dictionaries_name_gz}";
	}
	//查询行走装置类型
	public String getXingZouCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6 and T_SS_DICTIONARIES.dictionaries_name=#{dictionaries_name_xz}";
	}
	//查询其它类型
	public String getQiTaCount() {
		return "select count(*) from T_S_BR_ORDER_DETAIL_FAULT left join T_SS_DICTIONARIES "
				+ "on T_S_BR_ORDER_DETAIL_FAULT.fault_id = T_SS_DICTIONARIES.id "
				+ "where T_SS_DICTIONARIES.dictionaries_type = 6 and T_SS_DICTIONARIES.dictionaries_name=#{dictionaries_name_qt}";
	}
	
}
